# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
pkgname=mcman
pkgver=0.4.5
pkgrel=0
pkgdesc="Powerful Minecraft Server Manager CLI"
url="https://github.com/ParadigmMC/mcman"
arch="all"
license="GPL-3.0-only"
makedepends="
	cargo
	cargo-auditable
"
subpackages="$pkgname-doc"
source="	$pkgname-$pkgver.tar.gz::https://github.com/ParadigmMC/mcman/archive/refs/tags/$pkgver.tar.gz"
options="!check" # no tests

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

package() {
	install -Dm 755 target/release/mcman "$pkgdir"/usr/bin/mcman

	install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}

sha512sums="
871860d2a0ccbd2025842e0a3206c2efb9c2318681a99e23ebe3dc025c0ce07a69ba9ada19886e14652a6b68248356c4ba0c96116b7374472f5eda81b0fdc4ae  mcman-0.4.5.tar.gz
"
